Reorganizes network frontend device unregister and removal, so that
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 28 Dec 2005 14:07:43 +0000 (15:07 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Wed, 28 Dec 2005 14:07:43 +0000 (15:07 +0100)
commitada4e79b32e07d1b31f3aa7a2cfbcf912a5f08f4
tree2dbe774fdc5bd713cd54cc93ae36625726a22af3
parent914dc0db80197e64f6778f6dfa9d1c5bf9e49105
Reorganizes network frontend device unregister and removal, so that
occur in the right order and succeed.

Now on Closing state we:
- stop queue
- unbind irq
- unregister the device

On removal:
- end foreign access to TX and RX pages (we cannot do this before)
- free_netdev, doing the last stage of destroying an allocated device

Makes xm-test network "03_attach_detach_multiple_pos" pass:
http://xmtest.dague.org/cgi-bin/display?view=single&testid=1068

Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c